home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Demos / Extend 3.0 Demo / Demo Libraries / Demo Generic Lib / Demo Generic Lib.rsrc / HELP_30195_Input Random Number < prev    next >
Encoding:
Text File  |  1994-06-22  |  10.0 KB  |  62 lines

  1. Generates random integers or real numbers based on the selected distribution. You can use the dialog or the two inputs, 1 and 2, to specify arguments for the distributions. You can select the type of distribution:  Uniform (integer or real), Binomial, Erlang, Exponential, HyperExponential, LogNormal, Normal, Poisson, Triangular, Weibull, and General. The General distribution uses a table of up to 50 values to generate a discrete, stepped, or interpolated general distribution.
  2.  
  3. Dialog Choices (the distributions on the left are discussed first, then the General distribution)
  4. For the distributions on the left:
  5. (1): The first argument for the selected distribution. This variable changes depending on the type of distribution.
  6.  
  7. (2): The second argument for the selected distribution. This variable changes depending on the type of distribution; it is sometimes unused.
  8.  
  9. Plot N members for N=: Plots N values from the selected distribution in a histogram. Note: this plot is for the distributions on the left only; the General distribution has its own "Plot Table" button.
  10.  
  11. Integer, uniform:  Outputs an integer (whole) number greater than or equal to the integer selected for argument 1 and less than or equal to the integer selected for argument 2. In this distribution, all integer values between the minimum and maximum are equally likely to occur. For instance, you would use this distribution to indicate that the expected pricing for a new product is from 200 to 400 or to show values that represent "best case/worst case" scenarios.
  12.  
  13. Real, uniform:  This is the default selection. Outputs a real (decimal) number greater than or equal to the value selected for argument 1 and less than or equal to the value selected for argument 2. In this distribution, all the values between the minimum and maximum are equally likely to occur. For instance, you would use this distribution to indicate "best case/worst case" scenarios, or that the least a piece of equipment would cost would be $347.50 and the most it would cost would be $452.95.
  14.  
  15. Binomial: Outputs a value which is the number of successes (argument (1) – Prob) in a fixed number of independent trials (argument (2) – N). Prob is a real number and N is an integer. For example, this distribution is used to show the number of defective items in a batch of size N, the probability of error in the transmission of a message consisting of a specific number of bits, or the probability that a specified number of people will recover from a rare blood disease.
  16.  
  17. Constant:  It outputs a Constant (argument (1)) value every time unit. Use this distribution when the value is fixed or constant; the default is a value of 1. Argument (2) is unused.
  18.  
  19. Erlang: Outputs a value varying around the given (1) Mean, with a wide range of outcomes depending on the value of the second argument, "k". This distribution is used in telephone traffic and queueing theory when an activity or service time is considered to occur in phases with each phase being exponentially distributed. It is common to use the Erlang distribution as a service time when you want to simplify a model by combining several similar steps into one representative step. The value of "k" should be an integer. Like the Wiebull, the curve approximates other distributions depending on the value of its Mean and especially the value of "k". A "k" of 1 resembles the exponential distribution while larger values tend to a normal distribution.
  20.  
  21. Exponential: A distribution shaped like a decaying exponential. This choice outputs a value varying around the (1) Mean, where the Mean is a non-negative real number. However, the distribution is positively skewed (longer tail on the right), so it is more likely that the values will be between 0 and the Mean than between the Mean and two times the Mean. This distribution is the one most often used in science, business processes, and queuing theory. Use it to represent the length of a telephone conversation, the expected lives of electronic components, the time between failures for equipment, or any other situation where the events are competely independent of each other. It is generally not appropriate for modeling delay or processing times.
  22.  
  23. HyperExponential: A distribution used in telephone traffic and queuing theory given its Mean. It perturbs the Exponential distribution in a opposite way to the Erlang. The second argument, "s",  ranges from 0 to 0.5 with 0.5 giving an Exponential distribution.
  24.  
  25. LogNormal: Natural log of the variable that follows the gaussian or bell curve with the given (1) Mean and (2) Std Dev (standard deviation). This distribution outputs a value ≥ 0, skewed so that most of the values occur near the minimum value (positive skew). Lognormal is often appropriate for multiplying processes, while the Normal is best for additive processes. This distribution is widely used in business for security or property valuation, such as the rate of return on stock or real estate returns.
  26.  
  27. Normal: Gaussian or bell curve with the given (1) Mean and (2) Std Dev (standard deviation). This choice outputs a value approximately equal to the Mean every time unit, where the value is as likely to be from 0 to the Mean as to be from the Mean to two times the mean. The Mean is specified as a real number and the standard deviation is specified as a non-negative real number. The larger the standard deviation, the wider the spread of values around the mean. For example, given a mean of 6 and the expectation that 68% of the numbers will occur ±4 (that is, that 68% of the values fall between 2 and 10), you would enter a Std Dev of 4. This is calculated as 4/1, where 1 represents 1 standard deviation width of values (68%). However, if you expect that 96% of the numbers, or 2 standard deviations, will fall within that same range, enter a Std Dev of 2. This is calculated as 4/2. 
  28.  
  29. Poisson: Describes the number of events that occur in a given interval based on the given rate or (1) Mean. The variance equals the mean, so the larger the mean the wider the spread from the mean. This distribution is used to represent the number of telephone calls per minute, the number of errors per page, or the number of arrivals to a system. 
  30.  
  31. Triangular: Outputs a value N, where N is a real (decimal) number greater than or equal to the real number selected for argument 1 (the minimum) and less than or equal to the real number selected for argument 2 (the maximum) with the added provision that N tends towards its most likely, or modal value. You would use this distribution to specify a distribution in which you knew the lowest possible value, the highest possible value and a central tendency. The actual performance of this distribution will be similar to the normal distribution with the exception that it can be skewed (if the most likely value is specified to the left or right of the mean) and that there is no possibility of outlying values. Note that the most likely value is the mode and not the mean (or average). To determine the mean of the triangular distribution, sum the minimum, maximum, and most likely values together and then divide by 3.
  32.  
  33. Weibull:  This distribution can assume the properties of other distributions (such as the Exponential or Rayleigh)depending on its (1) Scale and (2) Shape arguments, both of which are non-negative real numbers. It is commonly used to describe failure rates, life-time expectancies, or the time to complete a task. The curve of the distribution changes considerably depending on the value of Scale (sometimes known as alpha) and especially the value of Shape (sometimes known as beta). The Shape variable should be greater than 0. For example, given a Scale of 1 and a Shape of 1, the Weibull is essentially an exponential distribution. However, given a Scale of 1 and a Shape of 2 the curve resembles a skewed normal distribution. 
  34.  
  35. The General distribution is on the right:
  36. To use the General distribution, you must select the "General" button on the right side of the dialog. Then choose a mode (discrete, stepped, or interpolated) and enter values in the table. 
  37.  
  38. Discrete: For the General distribution only. The data table will be used as discrete probabilities of the values given in the "Value" column. This means that the values listed in the value column are the exact numbers that the block will output.
  39.  
  40. General values =: Enter values in the first column and enter the probability of that value occurring in 100 cases in the second column. The value column contains the various values that will be output; Probability describes the chance that value will occur. The probabilities need only have the proper values relative to each other, since Extend scales them automatically. You may type the values in directly, or import the values to the data table through the Clipboard using the commands in the Edit menu.
  41.  
  42. Interpolated: For the General distribution only. The probability distribution will be interpolated between the data points. The value that is output will be the values in the table and the values between those values. The probability of any value being output is also adjusted. 
  43.  
  44. Plot Table: Plots the outline of the General distribution specified in the data table.
  45.  
  46. Stepped: For the General distribution only. The data table will be used as probabilities of ranges of data. The lowest value in the Value column defines the low end of the bin while the next range value defines the upper end. This choice requires that the last set of points define the upper end of the distribution. For this reason the probability level of the last and next to last points must be equal. If this is not in the data table, an additional point will be added onto the data.
  47.  
  48. Connectors
  49. 1: Value of argument 1. If connected, this overrides the (1) dialog parameter.
  50.  
  51. 2: Value of argument 2. If connected, this overrides the (2) dialog parameter.
  52.  
  53. The output is the random value.
  54.  
  55. References
  56. Gordon, System Simulation, Prentice Hall, pp. 125 - 150, 1978.
  57.  
  58. Pritsker, Introduction to Simulation and SLAM II, Halstead Press, pg. 715, 1986.
  59.  
  60. Extend Generic Library
  61. Copyright © 1989-1993 by Imagine That, Inc.
  62. All rights reserved. For use with Extend™ only.